﻿
function updateTableHtml(_data) {
    var tpl = HtmlUtil.htmlDecode($('#order_list_temp').html());
    laytpl(tpl).render(_data, function (render) {
        $('#divOrderList').html(render);
    });
    $("#datacurrpage").val(_data.page);
    createPaging('divpaging', _data.page, _data.total, function (_topagenum) { doToPageNm(_topagenum); });
}
function doToPageNm(_pNum) {
    var loadi = layer.load('正在查询中…');
    try {
        function closeload() { layer.close(loadi); }
        var _jsParam = new jsonRow();
        //                GetFormJson("J_MoreControl", _jsParam);
        _jsParam.AddCell("ACTION", "doFinderBoughtList");
        _jsParam.AddCell("NEW_PAGE_NUM", _pNum || $("#datacurrpage").val());
        _jsParam.AddCell("PAGE_ROW_COUNT", "20");
        _jsParam.AddCell("PAGE_ROW_SORT", "INITIAL_DT DESC");
        ajaxComm(_jsParam, null, closeload);
    }
    catch (err) {
        layer.close(loadi);
    }
};
function doaction(saction, soid, slid) {
    if (saction == "dodeleteorder") {
        if (!confirm("你确认要删除订单？删除后将不能被恢复！")) {
            return;
        }
    }
    if (saction == "toreturncharge") {
        if (!confirm("你确认要申请退款并取消订单吗？")) {
            return;
        }
    }
    if (saction == "docancelorder") {
        if (!confirm("你确认要取消订单吗？")) {
            return;
        }
    }
    var _jsParam = new jsonRow();
    _jsParam.AddCell("ACTION", saction);
    _jsParam.AddCell("ID", soid);
    _jsParam.AddCell("LID", slid);
    ajaxComm(_jsParam);
};
doToPageNm();